//
//  PicDefault.m
//  CarHome
//
//  Created by lanou3g on 15-5-1.
//  Copyright (c) 2015年 lanou3g. All rights reserved.
//

#import "PicDefault.h"
#import "PicList.h"

@implementation PicDefault

- (instancetype)init
{
    self = [super init];
    if (self) {
        _list = [[NSMutableArray alloc] initWithCapacity:0];
    }
    return self;
}

- (void)setValue:(id)value forUndefinedKey:(NSString *)key {
    if ([key isEqualToString:@"id"]) {
        self.ID = value;
    }
}

- (void)setList:(NSMutableArray *)list {
    
    for (NSMutableDictionary *item in list) {
        PicList *pl = [[PicList new] autorelease];
        [pl setValuesForKeysWithDictionary:item];
        [_list addObject:pl];
    }
    
}

- (void)dealloc
{
    [_ID release];
    [_name release];
    [_list release];
    [_total release];
    
    [super dealloc];
}

@end
